'use strict';

angular.module('biblioApp', ['ngRoute','ngSanitize','ui.keypress'])
    .config(function ($routeProvider) {
        $routeProvider
            .when('/', {
                templateUrl: 'views/main.html',
                controller: 'MainCtrl'
            })
            .when('/add', {
                templateUrl: 'views/add.html',
                controller: 'AddCtrl'
            })
            .when('/update/:bookId', {
                templateUrl: 'views/update.html',
                controller: 'UpdateCtrl'
            })
            .otherwise({
                redirectTo: '/'
            });
    });
